
if [[ $1 == 'cli' ]]
then
    #无界面
    rm -rf dist/ap_cli
    pyinstaller --hidden-import=gevent --hidden-import=geventwebsocket ap_cli.py
    cp -rf static dist/ap_cli/
    cp -f rsa_public_key.pem dist/ap_cli/

else
    #有界面
    rm -rf dist/ap_gui
    pyinstaller -w --hidden-import=gevent --hidden-import=geventwebsocket ap_gui.py
    cp -rf static dist/ap_gui/
    cp -f rsa_public_key.pem dist/ap_gui/
fi